package model.map;

import java.util.Queue;


public class Shrouded extends MapTileState {
	/**
	 * Create a Shrouded state.
	 * @param map
	 * @param point
	 */
	public Shrouded(GameMap map, MapPoint point) {
		super(map, point);
	}

	/**
	 * Changed the state to currently viewable.
	 */
	public void updateState() {
		int distance = MapPoint.findDistance(point, this.getAvatar().getLocation());
		int range = this.getAvatar().getViewRange();
		
		if(distance <= range)
			return;
		
		CurrentlyViewable state = new CurrentlyViewable(this.map, this.point);
		map.setTileState(point, state);	
	}
	
	/**
	 * Return the name of this state.
	 */
	public String getName() {
		return "Shrouded";
	}

	/**
	 * Return the string representation of a tile as seen by the avatar.
	 */
	public Queue<String> pullDataFromMap() {
		return this.getPulledData();
	}
}
